import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object fuhao {
  def main(args: Array[String]): Unit = {
    val conf: SparkConf = new SparkConf().setAppName("aaa").setMaster("local[2]")
    val sc = new SparkContext(conf)
    val rdd1: RDD[(String, String)] = sc.parallelize(List(("a","1 2"),("b","3 4")))
    val rdd3: RDD[(String, String)] = rdd1.flatMapValues(_.split(" "))
    print(rdd3.collect.toBuffer)

    sc.stop()
    sc.setCheckpointDir("")
    rdd1.checkpoint
    rdd1.isCheckpointed
    rdd1.count()
    rdd1.getCheckpointFile
  }
}
